FLAGS= -g -o 
CUBELIBPATH=../../cubelib
CUBEMODULEPATH=../../proc
INCLUDE= -I$(CUBELIBPATH)/include -I$(CUBEMODULEPATH)/include
CFLAGS= -g -c -fPIC -DUSER_MODE $(INCLUDE)
CC=gcc
CCP=g++
STRUCTOBJ=read_config.o
DEPENDLIB= -L$(CUBELIBPATH)/lib -lsys_func -lexmodule -lmessage -lmemdb -lstruct -lcrypto_func -ljson -lbasefunc -lstring -lalloc
#DEPENDLIB= -L$(CUBELIBPATH)/lib -lsys_func -lexmodule -ldispatch -lchannel -lmessage -lmemdb -lconnector -lstruct -lcrypto_func -ljson -lbasefunc -lstring -lalloc -lpthread
MODULELIB= -L$(CUBEMODULEPATH)/plugin -lhello

#main: main_proc lib_tool cube_exec envset_proc daemon_proc
main: main_proc
main_proc:  main_proc.c proc_config.h $(STRUCTOBJ)
	$(CC) $(FLAGS) main_proc main_proc.c $(STRUCTOBJ) $(INCLUDE) $(DEPENDLIB) $(MODULELIB)
read_config.o:  read_config.c proc_config.h
	$(CC) $(CFLAGS) read_config.c

clean:
	rm -f *~ *.o *.a  main_proc
